//
// GPSMapEdit
// (c) Konstantin Galichsky (kg@geopainting.com), 2002-2004
// Garmin and MapSource are registered trademarks or trademarks of Garmin Ltd. or one of its subsidiaries.
//
// Garmin IMG saver.
// NOTE: this is incomplete.
//

# include "StdAfx.h"
# include "GarminImg.h"
# include "GarminTypes.h"
# include "Map.h"
# include "Save.h"
# include "Status.h"
# include "ParseHelpers.h"
# include "Wrappers.h"
# include "Globals.h"

class CGarminImgSaver : public CMapSaver {
  public:
	virtual bool CanSave (const map_t & _map) {return _map.pTypeSet == & g_tsGarmin;}
	virtual bool PrepareToSave (const map_t & _map);
	virtual bool Save (HANDLE _hFile, const char * _strFileName, const map_t & _map);
};

DECLARE_MAP_SAVER (CGarminImgSaver, "garmin-img", "img", "Garmin MapSource map (*.img)");

bool CGarminImgSaver::PrepareToSave (const map_t & _map) {
	ErrorMsgBox (
		"Sorry, the feature is not implemented.\n"
		"Please use menu 'File | Export | Garmin IMG / cgpsmapper.exe' instead."
	);
	return false;
}

bool CGarminImgSaver::Save (HANDLE _hFile, const char * _strFileName, const map_t & _map) {
	// TODO:
	return false;
}